{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/krzysztofkrakowski/Dropbox/Kosovo project/2_Orders/4_Writing/JEPS_final/replication/stata_logs/2_news_data.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}30 Mar 2023, 09:47:40

{com}. do /var/folders/gm/8c3mn4mj2f5156vhvm1cmcym0000gp/Tselectedlines_piupiu.do
{txt}
{com}. ********************************************************************************
. *                                                                              *
. *           WHY DO PEOPLE USE INFORMAL JUSTICE? REPLICATION (JEPS)             *
. *                                                                              *
. ********************************************************************************
. 
.     
. 
. 
. * define data and results paths (fill in with your own URL)
.         global PathData = "/Users/krzysztofkrakowski/Dropbox/Kosovo project/2_Orders/1_Data/"
{txt}
{com}.         global PathTab = "/Users/krzysztofkrakowski/Dropbox/Kosovo project/2_Orders/4_Writing/z_tables/to_edit/"
{txt}
{com}.         global PathFig = "/Users/krzysztofkrakowski/Dropbox/Kosovo project/2_Orders/4_Writing/z_figures/"
{txt}
{com}.         
. 
. * upload the main data file (with original survey)
.         use "${c -(}PathData{c )-}kosovo_survey.dta", clear
{txt}
{com}. 
. 
. * merge data summing informal dispute settlement cases that appeared in the news
. merge m:1 KOMUNA using "${c -(}PathData{c )-}media.dta",  force
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}               1
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}               1{txt}  (_merge==2)

{col 5}matched{col 30}{res}           2,405{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. 
. 
. 
. 
. *** prepare outcome in three steps
. 
. 
. * first use lower cases in vignette strings
. gen orders_1 = lower(VINJETA1RANDOM)
{txt}(1 missing value generated)

{com}. gen orders_2 = lower(VINJETA2RANDOM)
{txt}(1 missing value generated)

{com}. 
. 
. * identify vignette type by keywords
.         * debt *
. gen orders_1_civil_debt = strpos(orders_1,"borg") 
{txt}
{com}. replace orders_1_civil_debt = orders_1_civil_debt>0
{txt}(578 real changes made)

{com}. gen orders_2_civil_debt = strpos(orders_2,"borg") 
{txt}
{com}. replace orders_2_civil_debt = orders_2_civil_debt>0
{txt}(623 real changes made)

{com}.         * inheritance *
. gen orders_1_civil_inheritance =  strpos(orders_1,"toke")
{txt}
{com}. replace orders_1_civil_inheritance = orders_1_civil_inheritance>0
{txt}(582 real changes made)

{com}. gen orders_2_civil_inheritance = strpos(orders_2,"toke")
{txt}
{com}. replace orders_2_civil_inheritance = orders_2_civil_inheritance>0
{txt}(622 real changes made)

{com}.         * domestic violence *
. gen orders_1_criminal_domestic = strpos(orders_1,"rrahur") 
{txt}
{com}. replace orders_1_criminal_domestic = orders_1_criminal_domestic>0 
{txt}(624 real changes made)

{com}. gen orders_2_criminal_domestic = strpos(orders_2,"rrahur")
{txt}
{com}. replace orders_2_criminal_domestic = orders_2_criminal_domestic>0 
{txt}(591 real changes made)

{com}.         * murder *
. gen orders_1_criminal_murder = strpos(orders_1,"rinj")
{txt}
{com}. replace orders_1_criminal_murder = orders_1_criminal_murder>0  
{txt}(621 real changes made)

{com}. gen orders_2_criminal_murder = strpos(orders_2,"rinj")
{txt}
{com}. replace orders_2_criminal_murder = orders_2_criminal_murder>0  
{txt}(569 real changes made)

{com}. 
. 
. 
. * code outcome variables 
.     * debt *
. gen legal_civil_debt=. 
{txt}(2,406 missing values generated)

{com}. replace legal_civil_debt=PERGJIGJJETAI1 if orders_1_civil_debt==1
{txt}(578 real changes made)

{com}. replace legal_civil_debt=PERGJIGJJETAI2 if orders_2_civil_debt==1
{txt}(623 real changes made)

{com}.     * inheritance *
. gen legal_civil_inheritance=. 
{txt}(2,406 missing values generated)

{com}. replace legal_civil_inheritance=PERGJIGJJETAI1 if orders_1_civil_inheritance==1
{txt}(582 real changes made)

{com}. replace legal_civil_inheritance=PERGJIGJJETAI2 if orders_2_civil_inheritance==1
{txt}(622 real changes made)

{com}.     * domestic violence *
. gen legal_criminal_domestic=. 
{txt}(2,406 missing values generated)

{com}. replace legal_criminal_domestic=PERGJIGJJETAI1 if orders_1_criminal_domestic==1
{txt}(624 real changes made)

{com}. replace legal_criminal_domestic=PERGJIGJJETAI2 if orders_2_criminal_domestic==1
{txt}(591 real changes made)

{com}.     * murder *
. gen legal_criminal_murder=. 
{txt}(2,406 missing values generated)

{com}. replace legal_criminal_murder=PERGJIGJJETAI1 if orders_1_criminal_murder==1
{txt}(621 real changes made)

{com}. replace legal_criminal_murder=PERGJIGJJETAI2 if orders_2_criminal_murder==1
{txt}(569 real changes made)

{com}. 
. 
. 
. 
. *** prepare treatment variables in two steps
.  
. 
. * decode treatments by keywords (in vigentte 1)
.     * resorucelessnesss (vignette 1)
. gen orders_1_t1 = strpos(orders_1,"varf") + strpos(orders_1,"dob")
{txt}
{com}. replace orders_1_t1 = orders_1_t1>0
{txt}(1,171 real changes made)

{com}.     * inefficiency (vignette 1)
. gen orders_1_t2 = strpos(orders_1,"ngadal")
{txt}
{com}. replace orders_1_t2 = orders_1_t2>0
{txt}(1,253 real changes made)

{com}.     * conventions (vignette 1)
. gen orders_1_t3 = strpos(orders_1,"nuk p")
{txt}
{com}. replace orders_1_t3 = orders_1_t3>0
{txt}(1,218 real changes made)

{com}. 
. * decode treatments by keywords (in vigentte 2)
.     * resorucelessnesss (vignette 2)
. gen orders_2_t1 = strpos(orders_2,"varf") + strpos(orders_2,"dob")
{txt}
{com}. replace orders_2_t1 = orders_2_t1>0
{txt}(1,224 real changes made)

{com}.     * inefficiency (vignette 2)
. gen orders_2_t2 = strpos(orders_2,"ngadal")
{txt}
{com}. replace orders_2_t2 = orders_2_t2>0
{txt}(1,173 real changes made)

{com}.     * conventions (vignette 2)
. gen orders_2_t3 = strpos(orders_2,"nuk p")
{txt}
{com}. replace orders_2_t3 = orders_2_t3>0
{txt}(1,211 real changes made)

{com}. 
. 
. 
. * code treatment variables 
.     * resourcelessness, debt *
. gen legal_civil_debt_t1=. 
{txt}(2,406 missing values generated)

{com}. replace legal_civil_debt_t1=orders_1_t1 if orders_1_civil_debt==1
{txt}(578 real changes made)

{com}. replace legal_civil_debt_t1=orders_2_t1 if orders_2_civil_debt==1
{txt}(623 real changes made)

{com}.     * resourcelessness, inheritance *
. gen legal_civil_inheritance_t1=. 
{txt}(2,406 missing values generated)

{com}. replace legal_civil_inheritance_t1=orders_1_t1 if orders_1_civil_inheritance==1
{txt}(582 real changes made)

{com}. replace legal_civil_inheritance_t1=orders_2_t1 if orders_2_civil_inheritance==1
{txt}(622 real changes made)

{com}.     * resourcelessness, domestic violence *
. gen legal_criminal_domestic_t1=. 
{txt}(2,406 missing values generated)

{com}. replace legal_criminal_domestic_t1=orders_1_t1 if orders_1_criminal_domestic==1
{txt}(624 real changes made)

{com}. replace legal_criminal_domestic_t1=orders_2_t1 if orders_2_criminal_domestic==1
{txt}(591 real changes made)

{com}.     * resourcelessness, murder *
. gen legal_criminal_murder_t1=. 
{txt}(2,406 missing values generated)

{com}. replace legal_criminal_murder_t1=orders_1_t1 if orders_1_criminal_murder==1
{txt}(621 real changes made)

{com}. replace legal_criminal_murder_t1=orders_2_t1 if orders_2_criminal_murder==1
{txt}(569 real changes made)

{com}. 
.     * inefficiency, debt *
. gen legal_civil_debt_t2=. 
{txt}(2,406 missing values generated)

{com}. replace legal_civil_debt_t2=orders_1_t2 if orders_1_civil_debt==1
{txt}(578 real changes made)

{com}. replace legal_civil_debt_t2=orders_2_t2 if orders_2_civil_debt==1
{txt}(623 real changes made)

{com}.     * inefficiency, inheritance *
. gen legal_civil_inheritance_t2=. 
{txt}(2,406 missing values generated)

{com}. replace legal_civil_inheritance_t2=orders_1_t2 if orders_1_civil_inheritance==1
{txt}(582 real changes made)

{com}. replace legal_civil_inheritance_t2=orders_2_t2 if orders_2_civil_inheritance==1
{txt}(622 real changes made)

{com}.     * inefficiency, domestic violence *
. gen legal_criminal_domestic_t2=. 
{txt}(2,406 missing values generated)

{com}. replace legal_criminal_domestic_t2=orders_1_t2 if orders_1_criminal_domestic==1
{txt}(624 real changes made)

{com}. replace legal_criminal_domestic_t2=orders_2_t2 if orders_2_criminal_domestic==1
{txt}(591 real changes made)

{com}.     * inefficiency, murder *
. gen legal_criminal_murder_t2=. 
{txt}(2,406 missing values generated)

{com}. replace legal_criminal_murder_t2=orders_1_t2 if orders_1_criminal_murder==1
{txt}(621 real changes made)

{com}. replace legal_criminal_murder_t2=orders_2_t2 if orders_2_criminal_murder==1
{txt}(569 real changes made)

{com}. 
.     * conventions, debt *
. gen legal_civil_debt_t3=. 
{txt}(2,406 missing values generated)

{com}. replace legal_civil_debt_t3=orders_1_t3 if orders_1_civil_debt==1
{txt}(578 real changes made)

{com}. replace legal_civil_debt_t3=orders_2_t3 if orders_2_civil_debt==1
{txt}(623 real changes made)

{com}.     * conventions, inheritance *
. gen legal_civil_inheritance_t3=. 
{txt}(2,406 missing values generated)

{com}. replace legal_civil_inheritance_t3=orders_1_t3 if orders_1_civil_inheritance==1
{txt}(582 real changes made)

{com}. replace legal_civil_inheritance_t3=orders_2_t3 if orders_2_civil_inheritance==1
{txt}(622 real changes made)

{com}.     * conventions, domestic violence *
. gen legal_criminal_domestic_t3=. 
{txt}(2,406 missing values generated)

{com}. replace legal_criminal_domestic_t3=orders_1_t3 if orders_1_criminal_domestic==1
{txt}(624 real changes made)

{com}. replace legal_criminal_domestic_t3=orders_2_t3 if orders_2_criminal_domestic==1
{txt}(591 real changes made)

{com}.     * conventions, murder *
. gen legal_criminal_murder_t3=. 
{txt}(2,406 missing values generated)

{com}. replace legal_criminal_murder_t3=orders_1_t3 if orders_1_criminal_murder==1
{txt}(621 real changes made)

{com}. replace legal_criminal_murder_t3=orders_2_t3 if orders_2_criminal_murder==1
{txt}(569 real changes made)

{com}. 
. 
. 
. 
. *** recode outcomes in binary variables (state vs nonstate justice)
. 
.     * debt *
. gen legal_civil_debt_bin=1 if legal_civil_debt>1
{txt}(818 missing values generated)

{com}. replace legal_civil_debt_bin=0 if legal_civil_debt==1
{txt}(818 real changes made)

{com}.     * inheritance *
. gen legal_civil_inheritance_bin=1 if legal_civil_inheritance>1
{txt}(797 missing values generated)

{com}. replace legal_civil_inheritance_bin=0 if legal_civil_inheritance==1
{txt}(797 real changes made)

{com}.     * domestic violence *
. gen legal_criminal_domestic_bin=1 if legal_criminal_domestic>1
{txt}(829 missing values generated)

{com}. replace legal_criminal_domestic_bin=0 if legal_criminal_domestic==1
{txt}(829 real changes made)

{com}.     * murder *
. gen legal_criminal_murder_bin=1 if legal_criminal_murder>1
{txt}(828 missing values generated)

{com}. replace legal_criminal_murder_bin=0 if legal_criminal_murder==1
{txt}(828 real changes made)

{com}. 
. 
. 
. 
. *** label variables
. 
. label variable  legal_civil_debt "Justice type (debt)"
{txt}
{com}. label variable  legal_civil_inheritance "Justice type (inheritance)"
{txt}
{com}. label variable  legal_criminal_domestic "Justice type (domestic violence)"
{txt}
{com}. label variable  legal_criminal_murder "Justice type (murder)"
{txt}
{com}. 
. label variable  legal_civil_debt_bin "State justice (debt)"
{txt}
{com}. label variable  legal_civil_inheritance_bin "State justice (inheritance)"
{txt}
{com}. label variable  legal_criminal_domestic_bin "State justice (domestic violence)"
{txt}
{com}. label variable  legal_criminal_murder_bin "State justice (murder)"
{txt}
{com}. 
. label define justice_types 1 "State justice" 2 "Religious justice" 3 "Community justice"
{txt}
{com}. label values    legal_civil_debt justice_types
{txt}
{com}. label values    legal_civil_inheritance justice_types
{txt}
{com}. label values    legal_criminal_domestic justice_types
{txt}
{com}. label values    legal_criminal_murder justice_types
{txt}
{com}. 
. label variable  legal_civil_debt_t1 "Resourcelessness"
{txt}
{com}. label variable  legal_civil_debt_t2 "Inefficiency"
{txt}
{com}. label variable  legal_civil_debt_t3 "Conventions"
{txt}
{com}. label variable  legal_civil_inheritance_t1 "Resourcelessness"
{txt}
{com}. label variable  legal_civil_inheritance_t2 "Inefficiency"
{txt}
{com}. label variable  legal_civil_inheritance_t3 "Conventions"
{txt}
{com}. label variable  legal_criminal_domestic_t1 "Resourcelessness"
{txt}
{com}. label variable  legal_criminal_domestic_t2 "Inefficiency"
{txt}
{com}. label variable  legal_criminal_domestic_t3 "Conventions"
{txt}
{com}. label variable  legal_criminal_murder_t1 "Resourcelessness"
{txt}
{com}. label variable  legal_criminal_murder_t2 "Inefficiency"
{txt}
{com}. label variable  legal_criminal_murder_t3 "Conventions"
{txt}
{com}. 
. 
. * standardize variables and label
. zval legal_civil_debt_bin legal_civil_inheritance_bin legal_criminal_domestic_bin legal_criminal_murder_bin    legal_civil_debt_t1 legal_civil_debt_t2 legal_civil_debt_t3 legal_civil_inheritance_t1  legal_civil_inheritance_t2  legal_civil_inheritance_t3     legal_criminal_domestic_t1  legal_criminal_domestic_t2  legal_criminal_domestic_t3  legal_criminal_murder_t1    legal_criminal_murder_t2    legal_criminal_murder_t3
{txt}(1,205 missing values generated)
(1,205 missing values generated)
(1,205 missing values generated)
(1,202 missing values generated)
(1,202 missing values generated)
(1,202 missing values generated)
(1,191 missing values generated)
(1,191 missing values generated)
(1,191 missing values generated)
(1,216 missing values generated)
(1,216 missing values generated)
(1,216 missing values generated)

{com}. label variable  z_legal_civil_debt_t1 "Resourcelessness (z)"
{txt}
{com}. label variable  z_legal_civil_debt_t2 "Inefficiency (z)"
{txt}
{com}. label variable  z_legal_civil_debt_t3 "Conventions (z)"
{txt}
{com}. label variable  z_legal_civil_inheritance_t1 "Resourcelessness (z)"
{txt}
{com}. label variable  z_legal_civil_inheritance_t2 "Inefficiency (z)"
{txt}
{com}. label variable  z_legal_civil_inheritance_t3 "Conventions (z)"
{txt}
{com}. label variable  z_legal_criminal_domestic_t1 "Resourcelessness (z)"
{txt}
{com}. label variable  z_legal_criminal_domestic_t2 "Inefficiency (z)"
{txt}
{com}. label variable  z_legal_criminal_domestic_t3 "Conventions (z)"
{txt}
{com}. label variable  z_legal_criminal_murder_t1 "Resourcelessness (z)"
{txt}
{com}. label variable  z_legal_criminal_murder_t2 "Inefficiency (z)"
{txt}
{com}. label variable  z_legal_criminal_murder_t3 "Conventions (z)"
{txt}
{com}. 
. 
. 
. 
. 
. *** code respondents' own legal preferences 
.     * debt *
. gen legal_debt_own=. 
{txt}(2,406 missing values generated)

{com}. replace legal_debt_own=PERGJIJETAI1 if orders_1_civil_debt==1
{txt}(578 real changes made)

{com}. replace legal_debt_own=PERGJIJETAI21 if orders_2_civil_debt==1
{txt}(623 real changes made)

{com}.     * inheritance *
. gen legal_inheritance_own=. 
{txt}(2,406 missing values generated)

{com}. replace legal_inheritance_own=PERGJIJETAI1 if orders_1_civil_inheritance==1
{txt}(582 real changes made)

{com}. replace legal_inheritance_own=PERGJIJETAI21 if orders_2_civil_inheritance==1
{txt}(622 real changes made)

{com}.     * domestic violence *
. gen legal_domestic_own=. 
{txt}(2,406 missing values generated)

{com}. replace legal_domestic_own=PERGJIJETAI1 if orders_1_criminal_domestic==1
{txt}(624 real changes made)

{com}. replace legal_domestic_own=PERGJIJETAI21 if orders_2_criminal_domestic==1
{txt}(591 real changes made)

{com}.     * murder *
. gen legal_murder_own=. 
{txt}(2,406 missing values generated)

{com}. replace legal_murder_own=PERGJIJETAI1 if orders_1_criminal_murder==1
{txt}(621 real changes made)

{com}. replace legal_murder_own=PERGJIJETAI21 if orders_2_criminal_murder==1
{txt}(569 real changes made)

{com}. 
. * dichotomize respondents' own legal preferences
. recode  legal_debt_own (1 = 0) (2 3 = 1), gen(legal_debt_own_bin)
{txt}(1201 differences between legal_debt_own and legal_debt_own_bin)

{com}. recode  legal_inheritance_own (1 = 0) (2 3 = 1), gen(legal_inheritance_own_bin)
{txt}(1204 differences between legal_inheritance_own and legal_inheritance_own_bin)

{com}. recode  legal_domestic_own (1 = 0) (2 3 = 1), gen(legal_domestic_own_bin)
{txt}(1215 differences between legal_domestic_own and legal_domestic_own_bin)

{com}. recode  legal_murder_own (1 = 0) (2 3 = 1), gen(legal_murder_own_bin)
{txt}(1190 differences between legal_murder_own and legal_murder_own_bin)

{com}. 
. 
. 
. 
. *** code respondent-level indicators of resourcelessness, beliefs about state justice inefficiency and average legal preferences in their municipalities
. recode Q34 (1 2 = 0) (3 = 1), gen(treat1)
{txt}(2405 differences between Q34 and treat1)

{com}. recode Q8 (1/3 = 0) (4/5 = 1), gen(treat2)
{txt}(2405 differences between Q8 and treat2)

{com}. bysort KOMUNA: egen treat3_debt=mean(legal_debt_own_bin)
{txt}(1 missing value generated)

{com}. bysort KOMUNA: egen treat3_inheritance=mean(legal_inheritance_own_bin)
{txt}(3 missing values generated)

{com}. bysort KOMUNA: egen treat3_domestic=mean(legal_domestic_own_bin)
{txt}(1 missing value generated)

{com}. bysort KOMUNA: egen treat3_murder=mean(legal_murder_own_bin)
{txt}(1 missing value generated)

{com}.     * label additional variables
. label variable treat1 "Resourcelessness"
{txt}
{com}. label variable treat2 "Inefficiency"
{txt}
{com}. label variable treat3_debt "Conventions"
{txt}
{com}. label variable treat3_inheritance "Conventions"
{txt}
{com}. label variable treat3_domestic "Conventions"
{txt}
{com}. label variable treat3_murder "Conventions"
{txt}
{com}. * standardize additional variables and label
. zval legal_debt_own_bin legal_inheritance_own_bin legal_domestic_own_bin legal_murder_own_bin  treat1   treat2  treat3_debt     treat3_inheritance      treat3_domestic treat3_murder
{txt}(1,205 missing values generated)
(1,202 missing values generated)
(1,191 missing values generated)
(1,216 missing values generated)
(1 missing value generated)
(1 missing value generated)
(1 missing value generated)
(3 missing values generated)
(1 missing value generated)
(1 missing value generated)

{com}. label variable z_treat1 "Resourcelessness"
{txt}
{com}. label variable z_treat2 "Inefficiency"
{txt}
{com}. label variable z_treat3_debt "Conventions"
{txt}
{com}. label variable z_treat3_inheritance "Conventions"
{txt}
{com}. label variable z_treat3_domestic "Conventions"
{txt}
{com}. label variable z_treat3_murder "Conventions"
{txt}
{com}. 
. 
. 
. 
. * recode informal dispute settlement cases (from the media data) at the municipality level
. egen informal_cases = rowtotal(debtcases murdercases property domesticviolencecases)
{txt}
{com}. egen informal_cases_criminal = rowtotal( murdercases  domesticviolencecases)
{txt}
{com}. egen informal_norms = rowmean(treat3_inheritance treat3_murder treat3_debt treat3_domestic)
{txt}(1 missing value generated)

{com}.     * per 1,000 inhabitants
. gen informal_cases_cap2 = informal_cases/(population/1000)
{txt}
{com}. 
. 
. 
. 
. * construct informal dispute settlement cases by municipal crime data
. gen informal_cases_cap = informal_cases/(dv_2020+theft_2020+murder_2020)
{txt}(632 missing values generated)

{com}. gen debt_cases_cap = debtcases/(dv_2020+theft_2020+murder_2020)
{txt}(632 missing values generated)

{com}. gen murder_cases_cap = murdercases/(dv_2020+theft_2020+murder_2020)
{txt}(632 missing values generated)

{com}. gen property_cases_cap = property/(dv_2020+theft_2020+murder_2020)
{txt}(632 missing values generated)

{com}. gen domestic_cases_cap = domesticviolencecases/(dv_2020+theft_2020+murder_2020)
{txt}(632 missing values generated)

{com}. egen crimes_tot = rowtotal(dv_2020 theft_2020 murder_2020), missing
{txt}(632 missing values generated)

{com}. 
. 
. 
. 
. * aggregate survey data at the municipality
. bys KOMUNA: gen count = _n
{txt}
{com}. bysort KOMUNA: egen poor_mean=mean(Q34)
{txt}(1 missing value generated)

{com}. bysort KOMUNA: egen mistrust_mean=mean(Q8)
{txt}(1 missing value generated)

{com}. 
. 
. 
. 
. * take logs of key variables
. gen lnpop = ln(population)
{txt}
{com}. gen lninformal = ln(informal_cases+1)
{txt}
{com}. gen ln_norms = ln(informal_norms+0.1)
{txt}(1 missing value generated)

{com}. gen ln_cases = ln(informal_cases_cap+0.1)
{txt}(632 missing values generated)

{com}. gen ln_cases2 = ln(informal_cases_cap2+0.1)
{txt}
{com}. gen ln_mistrust = ln(mistrust_mean+0.1)
{txt}(1 missing value generated)

{com}. gen ln_poor = ln(poor_mean+0.1)
{txt}(1 missing value generated)

{com}.     * and label
. label variable ln_poor "Resourcelessness (mun)"
{txt}
{com}. label variable ln_mistrust "Inefficiency (mun)"
{txt}
{com}. label variable ln_norms "Conventions (mun)"
{txt}
{com}.     * and standardize
. zval ln_poor ln_mistrust ln_norms poor_mean mistrust_mean informal_norms
{txt}(1 missing value generated)
(1 missing value generated)
(1 missing value generated)
(1 missing value generated)
(1 missing value generated)
(1 missing value generated)

{com}. 
. 
. 
. 
. 
. 
. *** produce tables and figures
. 
. 
. 
. * Figure A4
. twoway (lfit ln_cases2 ln_norms if count==1) (scatter ln_cases2 ln_norms if count==1) (lfit ln_cases2 ln_mistrust if count==1) (scatter ln_cases2 ln_mistrust if count==1) 
{res}{txt}
{com}.     * labels need to be manually edited before saving the figure as FigureA4.png
. 
. 
. * Figure A5 
. twoway (lfit ln_cases ln_norms if count==1) (scatter ln_cases ln_norms if count==1) (lfit ln_cases ln_mistrust if count==1) (scatter ln_cases ln_mistrust if count==1) 
{res}{txt}
{com}.    * labels need to be manually edited before saving the figure as FigureA5.png
. 
. 
. 
. * Table A10
. eststo clear
{txt}
{com}. eststo Informal_Settlements_1: nbreg informal_cases z_ln_poor z_ln_mistrust z_ln_norms if count==1, exp(crimes_tot)  

{txt}Fitting Poisson model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-58.645755}  
Iteration 1:{space 3}log likelihood = {res:-58.449844}  
Iteration 2:{space 3}log likelihood = {res:-58.449584}  
Iteration 3:{space 3}log likelihood = {res:-58.449584}  
{res}
{txt}Fitting constant-only model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-54.189448}  
Iteration 1:{space 3}log likelihood = {res:-52.612626}  
Iteration 2:{space 3}log likelihood = {res:-52.563502}  
Iteration 3:{space 3}log likelihood = {res:-52.563348}  
Iteration 4:{space 3}log likelihood = {res:-52.563348}  
{res}
{txt}Fitting full model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-49.750111}  
Iteration 1:{space 3}log likelihood = {res:-49.051452}  
Iteration 2:{space 3}log likelihood = {res:-48.783796}  
Iteration 3:{space 3}log likelihood = {res:-48.779135}  
Iteration 4:{space 3}log likelihood = {res:-48.779134}  
{res}
{txt}Negative binomial regression{col 49}Number of obs{col 67}= {res}        17
{txt}{col 49}LR chi2({res}3{txt}){col 67}= {res}      7.57
{txt}{col 1}Dispersion{col 16}= {res}mean{txt}{col 49}Prob > chi2{col 67}= {res}    0.0558
{txt}Log likelihood = {res}-48.779134{txt}{col 49}Pseudo R2{col 67}= {res}    0.0720

{txt}{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}informal_cases{col 16}{c |}      Coef.{col 28}   Std. Err.{col 40}      z{col 48}   P>|z|{col 56}     [95% Con{col 69}f. Interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}z_ln_poor {c |}{col 16}{res}{space 2} .1623995{col 28}{space 2} .1117568{col 39}{space 1}    1.45{col 48}{space 3}0.146{col 56}{space 4}-.0566397{col 69}{space 3} .3814388
{txt}{space 1}z_ln_mistrust {c |}{col 16}{res}{space 2} .2389471{col 28}{space 2} .1249476{col 39}{space 1}    1.91{col 48}{space 3}0.056{col 56}{space 4}-.0059457{col 69}{space 3} .4838398
{txt}{space 4}z_ln_norms {c |}{col 16}{res}{space 2} .2541556{col 28}{space 2} .1228245{col 39}{space 1}    2.07{col 48}{space 3}0.039{col 56}{space 4}  .013424{col 69}{space 3} .4948872
{txt}{space 9}_cons {c |}{col 16}{res}{space 2} -2.14062{col 28}{space 2} .1521625{col 39}{space 1}  -14.07{col 48}{space 3}0.000{col 56}{space 4}-2.438853{col 69}{space 3}-1.842387
{col 1}{txt}ln(crimes_tot){col 16}{c |}{res}{space 2}        1{col 28}{txt}  (exposure)
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}/lnalpha {c |}{col 16}{res}{space 2}-1.498643{col 28}{space 2} .5974921{col 56}{space 4}-2.669706{col 69}{space 3}-.3275806
{txt}{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         alpha {c |}{col 16}{res}{space 2}  .223433{col 28}{space 2} .1334995{col 56}{space 4} .0692726{col 69}{space 3} .7206652
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
LR test of alpha=0: {help j_chibar##|_new:chibar2(01) = }{res}19.34{col 56}{txt}Prob >= chibar2 = {res}0.000
{txt}
{com}. eststo Informal_Settlements_2: nbreg informal_cases z_ln_poor z_ln_mistrust z_ln_norms lnpop if count==1, exp(crimes_tot)  

{txt}Fitting Poisson model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-55.096577}  
Iteration 1:{space 3}log likelihood = {res:-54.599289}  
Iteration 2:{space 3}log likelihood = {res: -54.59803}  
Iteration 3:{space 3}log likelihood = {res: -54.59803}  
{res}
{txt}Fitting constant-only model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-54.189448}  
Iteration 1:{space 3}log likelihood = {res:-52.612626}  
Iteration 2:{space 3}log likelihood = {res:-52.563502}  
Iteration 3:{space 3}log likelihood = {res:-52.563348}  
Iteration 4:{space 3}log likelihood = {res:-52.563348}  
{res}
{txt}Fitting full model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-49.736572}  
Iteration 1:{space 3}log likelihood = {res:-48.942279}  
Iteration 2:{space 3}log likelihood = {res:-48.728874}  
Iteration 3:{space 3}log likelihood = {res:-48.724196}  
Iteration 4:{space 3}log likelihood = {res:-48.724195}  
{res}
{txt}Negative binomial regression{col 49}Number of obs{col 67}= {res}        17
{txt}{col 49}LR chi2({res}4{txt}){col 67}= {res}      7.68
{txt}{col 1}Dispersion{col 16}= {res}mean{txt}{col 49}Prob > chi2{col 67}= {res}    0.1041
{txt}Log likelihood = {res}-48.724195{txt}{col 49}Pseudo R2{col 67}= {res}    0.0730

{txt}{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}informal_cases{col 16}{c |}      Coef.{col 28}   Std. Err.{col 40}      z{col 48}   P>|z|{col 56}     [95% Con{col 69}f. Interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}z_ln_poor {c |}{col 16}{res}{space 2} .1875818{col 28}{space 2} .1331412{col 39}{space 1}    1.41{col 48}{space 3}0.159{col 56}{space 4}-.0733702{col 69}{space 3} .4485338
{txt}{space 1}z_ln_mistrust {c |}{col 16}{res}{space 2} .2366664{col 28}{space 2} .1237485{col 39}{space 1}    1.91{col 48}{space 3}0.056{col 56}{space 4}-.0058762{col 69}{space 3} .4792091
{txt}{space 4}z_ln_norms {c |}{col 16}{res}{space 2} .2517873{col 28}{space 2} .1208142{col 39}{space 1}    2.08{col 48}{space 3}0.037{col 56}{space 4} .0149958{col 69}{space 3} .4885787
{txt}{space 9}lnpop {c |}{col 16}{res}{space 2}-.0669738{col 28}{space 2} .1989287{col 39}{space 1}   -0.34{col 48}{space 3}0.736{col 56}{space 4}-.4568668{col 69}{space 3} .3229192
{txt}{space 9}_cons {c |}{col 16}{res}{space 2} -1.41932{col 28}{space 2} 2.148891{col 39}{space 1}   -0.66{col 48}{space 3}0.509{col 56}{space 4}-5.631068{col 69}{space 3} 2.792429
{col 1}{txt}ln(crimes_tot){col 16}{c |}{res}{space 2}        1{col 28}{txt}  (exposure)
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}/lnalpha {c |}{col 16}{res}{space 2}-1.533729{col 28}{space 2} .6206639{col 56}{space 4}-2.750208{col 69}{space 3}-.3172504
{txt}{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         alpha {c |}{col 16}{res}{space 2} .2157296{col 28}{space 2} .1338956{col 56}{space 4} .0639145{col 69}{space 3} .7281484
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
LR test of alpha=0: {help j_chibar##|_new:chibar2(01) = }{res}11.75{col 56}{txt}Prob >= chibar2 = {res}0.000
{txt}
{com}. eststo Informal_Settlements_3: nbreg informal_cases_criminal z_ln_poor z_ln_mistrust z_ln_norms lnpop if count==1, exp(crimes_tot)  

{txt}Fitting Poisson model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-51.985995}  
Iteration 1:{space 3}log likelihood = {res: -51.58644}  
Iteration 2:{space 3}log likelihood = {res: -51.58548}  
Iteration 3:{space 3}log likelihood = {res: -51.58548}  
{res}
{txt}Fitting constant-only model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-52.388385}  
Iteration 1:{space 3}log likelihood = {res:-51.262186}  
Iteration 2:{space 3}log likelihood = {res:-51.233777}  
Iteration 3:{space 3}log likelihood = {res:-51.233728}  
Iteration 4:{space 3}log likelihood = {res:-51.233728}  
{res}
{txt}Fitting full model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-47.672513}  
Iteration 1:{space 3}log likelihood = {res:-46.670683}  
Iteration 2:{space 3}log likelihood = {res:-46.485974}  
Iteration 3:{space 3}log likelihood = {res:-46.481749}  
Iteration 4:{space 3}log likelihood = {res:-46.481747}  
{res}
{txt}Negative binomial regression{col 49}Number of obs{col 67}= {res}        17
{txt}{col 49}LR chi2({res}4{txt}){col 67}= {res}      9.50
{txt}{col 1}Dispersion{col 16}= {res}mean{txt}{col 49}Prob > chi2{col 67}= {res}    0.0497
{txt}Log likelihood = {res}-46.481747{txt}{col 49}Pseudo R2{col 67}= {res}    0.0928

{txt}{hline 24}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}informal_cases_criminal{col 25}{c |}      Coef.{col 37}   Std. Err.{col 49}      z{col 57}   P>|z|{col 65}     [95% Con{col 78}f. Interval]
{hline 24}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 14}z_ln_poor {c |}{col 25}{res}{space 2} .2251881{col 37}{space 2} .1352992{col 48}{space 1}    1.66{col 57}{space 3}0.096{col 65}{space 4}-.0399935{col 78}{space 3} .4903697
{txt}{space 10}z_ln_mistrust {c |}{col 25}{res}{space 2} .2978822{col 37}{space 2} .1272154{col 48}{space 1}    2.34{col 57}{space 3}0.019{col 65}{space 4} .0485445{col 78}{space 3} .5472198
{txt}{space 13}z_ln_norms {c |}{col 25}{res}{space 2} .2849325{col 37}{space 2} .1251681{col 48}{space 1}    2.28{col 57}{space 3}0.023{col 65}{space 4} .0396075{col 78}{space 3} .5302574
{txt}{space 18}lnpop {c |}{col 25}{res}{space 2}-.1371612{col 37}{space 2} .1971007{col 48}{space 1}   -0.70{col 57}{space 3}0.486{col 65}{space 4}-.5234716{col 78}{space 3} .2491491
{txt}{space 18}_cons {c |}{col 25}{res}{space 2}-.8033592{col 37}{space 2} 2.127988{col 48}{space 1}   -0.38{col 57}{space 3}0.706{col 65}{space 4}-4.974139{col 78}{space 3} 3.367421
{col 1}{txt}         ln(crimes_tot){col 25}{c |}{res}{space 2}        1{col 37}{txt}  (exposure)
{hline 24}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 15}/lnalpha {c |}{col 25}{res}{space 2}-1.525981{col 37}{space 2} .6362449{col 65}{space 4}-2.772998{col 78}{space 3} -.278964
{txt}{hline 24}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
                  alpha {c |}{col 25}{res}{space 2} .2174077{col 37}{space 2} .1383245{col 65}{space 4} .0624744{col 78}{space 3} .7565671
{txt}{hline 24}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
LR test of alpha=0: {help j_chibar##|_new:chibar2(01) = }{res}10.21{col 56}{txt}Prob >= chibar2 = {res}0.001
{txt}
{com}. esttab Informal_Settlements_1 Informal_Settlements_2 Informal_Settlements_3 using "${c -(}PathTab{c )-}TableA10.tex", b(3) se(3) star(* 0.1 ** 0.05 *** 0.01) drop(_cons) label nodepvar mtitles title("Determinants of Informal Dispute Settlement: Municipal-Level Analysis") replace nonotes postfoot(" ")
{res}{txt}(output written to {browse  `"/Users/krzysztofkrakowski/Dropbox/Kosovo project/2_Orders/4_Writing/z_tables/to_edit/TableA10.tex"'})

{com}. 
. 
. 
. 
. 
. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/krzysztofkrakowski/Dropbox/Kosovo project/2_Orders/4_Writing/JEPS_final/replication/stata_logs/2_news_data.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}30 Mar 2023, 09:48:01
{txt}{.-}
{smcl}
{txt}{sf}{ul off}